home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: cs.mun.ca!sjt
- From: sjt@cs.mun.ca (Stephen J. Tremblett)
- Subject: Re: String Arrays and string parsing
- Message-ID: <1996Mar1.184726.16618@cs.mun.ca>
- Sender: usenet@cs.mun.ca (NNTP server account)
- Organization: CS Dept., Memorial University of Newfoundland
- X-Newsreader: TIN [version 1.2 PL2]
- References: <31287278.789445@news.inforamp.net> <4gaqrj$3kn@hacgate2.hac.com> <824846500snz@genesis.demon.co.uk>
- Date: Fri, 1 Mar 1996 18:47:26 GMT
-
-
- How about using strtok()? It will find your specified delimiters in a
- string and break the string into a group of array elements.
- ex : buffer = "07/29/1973"
- Using "/" as our delimiter, we get date[0] = "07", date[1] = "29",
- date[2] = "1973".
-
- I'd post the function where I actually used strtok(), but I can't seem to
- find it right now...
-
- Steve T.
-
- --
- I am far to young to feel so old
- And far too tired to care
- But I took down twenty bastards before they left me lying there
- - The Lowest of the Low
-